<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>td加斜线</title>
    <!--<style>
        table{
            border-collapse:collapse;
        }
        table,tr,td{
            border:1px solid black;
        }
        td{
            width:100px;/*这里需要自己调整，根据自己的需求调整宽度*/
            height:50px;/*这里需要自己调整，根据自己的需求调整高度*/
            position: relative;
        }
        td[class=first]:before{
            content: "";
            position: absolute;
            width: 1px;
            height:114px;/*这里需要自己调整，根据td的宽度和高度*/
            top:0;
            left:0;
            background-color: black;
            display: block;
            transform: rotate(-63deg);/*这里需要自己调整，根据线的位置*/
            transform-origin: top;
        }

    </style>-->
    <style>
        table {
            border-collapse: collapse;
        }

        table, tr, td {
            border: 1px solid black;
        }

        td {
            text-align: center;
            height: 50px; /*这里需要自己调整，根据自己的需求调整高度*/
            position: relative;
        }
        td[class=first]{
            width: 50px;
            height: 50px;
        }
        /*td[class=first]:before {
            content: "";
            position: absolute;
            width: 1px;
            height: 104px;
            top: 0;
            left: 0;
            background-color: #000;
            display: block;
            transform: rotate(-75deg);
            transform-origin: top;
            -ms-transform: rotate(-75deg);
            -ms-transform-origin: top;
        }*/
        td[class=first]:after {
            content: "";
            position: absolute;
            width: 1px;
            height: 70px;
            top: 0;
            left: 0;
            background-color: #000;
            display: block;
            transform: rotate(-45deg);
            transform-origin: top;
            -ms-transform: rotate(-45deg);
            -ms-transform-origin: top;
        }
        .title1{
            position: absolute;
            top: 0px;
            right:0px;
        }
        .title2{
            position: absolute;
            top: 26px;
            right:0px;
        }
        .title3{
            position: absolute;
            top: 30px;
            left:0px;
        }
    </style>

</head>
<body>
<!--<table>
    <tr>
        <th>姓名</th>
        <th>年龄</th>
        <th>性别</th>
    </tr>
    <tr>
        <td class="first"></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td></td>
    </tr>
</table>-->
<table>
    <tr>
        <td class="first" colspan="2"><span class="title1">产品</span><br><span class="title3">地区</span></td>
        <td>小米</td>
        <td>华为</td>
        <td>苹果手机</td>
    </tr>
    <tr>
        <td>1</td>
        <td>天</td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td>2</td>
        <td>北</td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
</table>

</body>